package com.ek.distmpl.dao.mapper;

import com.ek.distmpl.dao.model.App;
import com.ek.distmpl.dao.model.AppExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface AppMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=AppSqlProvider.class, method="countByExample")
    long countByExample(AppExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @DeleteProvider(type=AppSqlProvider.class, method="deleteByExample")
    int deleteByExample(AppExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Delete({
        "delete from app",
        "where app_id = #{appId,jdbcType=CHAR}"
    })
    int deleteByPrimaryKey(String appId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Insert({
        "insert into app (app_id, app_name, ",
        "app_type, app_version, ",
        "dtimes, app_copyright, ",
        "app_release_time, app_status, ",
        "app_descr)",
        "values (#{appId,jdbcType=CHAR}, #{appName,jdbcType=VARCHAR}, ",
        "#{appType,jdbcType=VARCHAR}, #{appVersion,jdbcType=VARCHAR}, ",
        "#{dtimes,jdbcType=DOUBLE}, #{appCopyright,jdbcType=VARCHAR}, ",
        "#{appReleaseTime,jdbcType=VARCHAR}, #{appStatus,jdbcType=INTEGER}, ",
        "#{appDescr,jdbcType=LONGVARCHAR})"
    })
    int insert(App record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @InsertProvider(type=AppSqlProvider.class, method="insertSelective")
    int insertSelective(App record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=AppSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="app_id", property="appId", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="app_name", property="appName", jdbcType=JdbcType.VARCHAR),
        @Result(column="app_type", property="appType", jdbcType=JdbcType.VARCHAR),
        @Result(column="app_version", property="appVersion", jdbcType=JdbcType.VARCHAR),
        @Result(column="dtimes", property="dtimes", jdbcType=JdbcType.DOUBLE),
        @Result(column="app_copyright", property="appCopyright", jdbcType=JdbcType.VARCHAR),
        @Result(column="app_release_time", property="appReleaseTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="app_status", property="appStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="app_descr", property="appDescr", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<App> selectByExampleWithBLOBs(AppExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=AppSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="app_id", property="appId", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="app_name", property="appName", jdbcType=JdbcType.VARCHAR),
        @Result(column="app_type", property="appType", jdbcType=JdbcType.VARCHAR),
        @Result(column="app_version", property="appVersion", jdbcType=JdbcType.VARCHAR),
        @Result(column="dtimes", property="dtimes", jdbcType=JdbcType.DOUBLE),
        @Result(column="app_copyright", property="appCopyright", jdbcType=JdbcType.VARCHAR),
        @Result(column="app_release_time", property="appReleaseTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="app_status", property="appStatus", jdbcType=JdbcType.INTEGER)
    })
    List<App> selectByExample(AppExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Select({
        "select",
        "app_id, app_name, app_type, app_version, dtimes, app_copyright, app_release_time, ",
        "app_status, app_descr",
        "from app",
        "where app_id = #{appId,jdbcType=CHAR}"
    })
    @Results({
        @Result(column="app_id", property="appId", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="app_name", property="appName", jdbcType=JdbcType.VARCHAR),
        @Result(column="app_type", property="appType", jdbcType=JdbcType.VARCHAR),
        @Result(column="app_version", property="appVersion", jdbcType=JdbcType.VARCHAR),
        @Result(column="dtimes", property="dtimes", jdbcType=JdbcType.DOUBLE),
        @Result(column="app_copyright", property="appCopyright", jdbcType=JdbcType.VARCHAR),
        @Result(column="app_release_time", property="appReleaseTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="app_status", property="appStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="app_descr", property="appDescr", jdbcType=JdbcType.LONGVARCHAR)
    })
    App selectByPrimaryKey(String appId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=AppSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") App record, @Param("example") AppExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=AppSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") App record, @Param("example") AppExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=AppSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") App record, @Param("example") AppExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=AppSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(App record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Update({
        "update app",
        "set app_name = #{appName,jdbcType=VARCHAR},",
          "app_type = #{appType,jdbcType=VARCHAR},",
          "app_version = #{appVersion,jdbcType=VARCHAR},",
          "dtimes = #{dtimes,jdbcType=DOUBLE},",
          "app_copyright = #{appCopyright,jdbcType=VARCHAR},",
          "app_release_time = #{appReleaseTime,jdbcType=VARCHAR},",
          "app_status = #{appStatus,jdbcType=INTEGER},",
          "app_descr = #{appDescr,jdbcType=LONGVARCHAR}",
        "where app_id = #{appId,jdbcType=CHAR}"
    })
    int updateByPrimaryKeyWithBLOBs(App record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table app
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Update({
        "update app",
        "set app_name = #{appName,jdbcType=VARCHAR},",
          "app_type = #{appType,jdbcType=VARCHAR},",
          "app_version = #{appVersion,jdbcType=VARCHAR},",
          "dtimes = #{dtimes,jdbcType=DOUBLE},",
          "app_copyright = #{appCopyright,jdbcType=VARCHAR},",
          "app_release_time = #{appReleaseTime,jdbcType=VARCHAR},",
          "app_status = #{appStatus,jdbcType=INTEGER}",
        "where app_id = #{appId,jdbcType=CHAR}"
    })
    int updateByPrimaryKey(App record);
}